define(["jQuery", "kendo"], function ($, kendo) {
    return {
		
		show : function(){ 
			$( "#user-list-dialog-menu" ).show();	 	
		},
		populate:function(data)
		{
			$('.user_list_item').remove();
			var shownUsers = [];
			for(var i=0;i<data.length;i++)
			{
				if(shownUsers.indexOf(data[i].user_id) == -1){
					var newUserObject =  $('<tr class="error user_list_item" style="border:1px solid #000;"></tr>').insertAfter('.list_user_title');
					newUserObject.html("<td colspan=\"2\">"+data[i].username+"</td>");
					shownUsers.push(data[i].user_id);
				}
			}
			
		},
        init: function (e) {
		
			var indxList = false;
			console.log("init user list ...");
			 $(".list-user").click(function(e){	
        		App.listUserMenu.show();
        		
        	});
			$(".dismiss_table").click(function(e){	
        			$("#user-list-dialog-menu").hide();
        		
        	});
					
			$("#user-list-dialog-menu").draggable();
			$("#user-list-dialog-menu").hide();
		
		} 
		 
	}	
});